package com.ws.ssmzongjie3.service.impl;

import com.ws.ssmzongjie3.bean.Comments;
import com.ws.ssmzongjie3.mapper.CommentsMapper;
import com.ws.ssmzongjie3.service.CommentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CommentsServiceImpl implements CommentsService {
    @Autowired
    private CommentsMapper commentsMapper;
    @Override
    public int deleteCommentById(Comments comments) {


        return commentsMapper.deleteCommentById(comments);
    }

    @Override
    public int insertComment(Comments comments) {
        return commentsMapper.insertComment(comments);
    }

    @Override
    public Comments getCommentById(Comments comments) {


        return commentsMapper.getCommentById(comments);
    }

    @Override
    public int updateCommentById(Comments comments) {
        return commentsMapper.updateCommentById(comments);
    }

    @Override
    public List<Comments> listCommentByRouteId(Comments comments) {
        return commentsMapper.listCommentByRouteId(comments);
    }
}
